import { OnInit, Component } from '@angular/core';
import { StudentService } from 'src/app/project/service/icm/icm-system-user/student/student.service';
import { StudentDTO } from 'src/app/project/model/icm/icm-system-user/student/student.dto';
import { SettingsService } from '@delon/theme';

@Component({
  selector: 'app-student-profile-view',
  templateUrl: './student-profile-view.component.html',
  styles: [],
})
export class StudentProfileViewComponent implements OnInit {
  constructor(private studentService: StudentService, private settingService: SettingsService) {}

  /**
   * 当前登录学生id
   */
  studentId: string;

  /**
   * 当前登录学生
   */
  student: StudentDTO;

  ngOnInit() {
    this.studentId = this.settingService.user.id;
    this.studentService.findById(this.studentId).subscribe(data => {
      this.student = data;
    });
  }
}
